/*
* ============================================================================
*  Name        : example_009.h
*  Part of     : Finite state machine examples
*  Description : Class definition
*  Version     : %version: %
*  
*
* ============================================================================
*/
#if !defined(  __sm_example_main_h__ )
#define __sm_example_main_h__

#include <sea_statemachine>

using namespace sea;

/**
 * @file example_009.h
 * @brief 
 *
 * @ingroup StateMachineExamples
 *
 */

/**
 * SEA examples
 */
namespace sea_examples
{
    /**
     * @class Snake
     * @brief \b Examples: Console user input state machine
     *
     * @ingroup StateMachineExamples
     */
    class Input : public StateMachine
    {
    public:
        Input( StateMachine* Listener = NULL, EventId aEventId = 0 ) : 
            StateMachine( STATEMACHINE_NAME ),
            m_listener( Listener ),
            m_event_id( aEventId )
            { }

        EVENT_INT( Input, Ev_Int_Key );

    private:
        ACT( Input, get_a_key );
        ACT( Input, send_to_listeners );

    private:
        StateMachine* m_listener;
        EventId m_event_id;
    };

#if defined( SEA_OS_LINUX )
    int _kbhit( );
    int _getch( );
#endif

}

#endif
